package com.cty.advice;

import org.apache.log4j.Logger;
import org.springframework.aop.ThrowsAdvice;

/**
 * @Auther: cty
 * @Date: 2020/3/7 17:31
 * @Description:  异常通知类
 * @version: 1.0
 */
public class MyThrowsAdvice implements ThrowsAdvice {
    // 获取日志对象
    Logger log = Logger.getLogger(MyThrowsAdvice.class);


    public void afterThrowing(Exception ex){
        log.debug("异常通知-Schema-based  异常为："+ex.getMessage());
    }
}
